package Numbers;

import static java.lang.Math.sqrt;

/**
 * Created by Nishi on 26/12/13.
 * Prints out the numbers 1 through 100.
 * Instead of numbers divisible by three print "Fizz".
 * Instead of numbers divisible by five print "Buzz".
 * Instead of numbers divisible by three and five print "FizzBuzz".
 *
 */

public class FizzBuzz {

    public static void main(String[] args) {
        FizzBuzz();
    }

    private static void FizzBuzz(){
        for ( int number =1; number <=100; number++){
            if (number%3 ==0 && number%5==0)
            {
                System.out.println("FizzBuzz");
            }
            else if (number%3==0){
                System.out.println("Fizz");
            }
            else if (number%5==0){
                System.out.println("Buzz");
            }
            else System.out.println(number);
        }
    }

}
